<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>VIEW EVENTS</title>
</head>

<body>
	<?php
        //if (isset($_COOKIE["Studial"]))
        //{
			//$nameCookie = $_COOKIE['Studial'];
			
			$CourseID = $_GET['CourseID'];
			
            $ini_array = parse_ini_file("../config1.ini");
			@ $con = mysql_pconnect($ini_array['dblink'], $ini_array['dbuser'], $ini_array['dbpass']);
        //}
        //else
        //{
            //header('location: ../login/deletecookies.php');
            //exit;
        //}
	?>
    
    	<h2 align="center">VIEW EVENT</h2>
        <table border="1" align="center">
            <tr align="center">
            	<td>Start Date</td>
                <td>Finish Date</td>
            </tr>
            <?php
				//$nameCookie = $_COOKIE['Studial'];
                
                mysql_set_charset('utf8');
                
                mysql_select_db($ini_array['dbname']);
				
                $select = "SELECT * FROM `assignments` WHERE coursr_id = '".$CourseID."'";
                $result = mysql_query($select);
				
                $numresult = mysql_num_rows($result);
				
                for($i=1; $i<=$numresult; $i++)
                {
                    $row = mysql_fetch_array($result);
					echo "<tr><td>".stripslashes($row['startdate'])."</td>";
                    echo "<td>".stripslashes($row['finishdate'])."</td></tr>";
                }
            ?>
        </table>
</body>
</html>